#pragma once

/*
 * TCP 服务器，对外提供服务的中间件
 */

#include <memory>

#include "KVMiddleware.h"
#include "Session.h"

class Server {
public:
    Server(boost::asio::io_context &ioContext, int port);

private:
    // 接受连接
    boost::asio::awaitable<void> accept();


    tcp::acceptor acceptor_;

    std::shared_ptr<KVMiddleware> kv_middleware_;
};